package com.wxtt.android.adapter;

import android.widget.AbsListView;

import com.fast.dev.frame.Adapter.listview.AdapterHolder;
import com.fast.dev.frame.Adapter.listview.BaseListAdapter;
import com.fast.dev.frame.utils.DateUtils;
import com.wxtt.android.R;
import com.wxtt.android.bean.JokeBean;

import java.util.List;

/**
 * 说明：JokeAdapter
 * <p/>
 * 作者：fanly
 * <p/>
 * 时间：2016/2/22 20:51
 * <p/>
 * 版本：verson 1.0
 */
public class JokeAdapter extends BaseListAdapter<JokeBean>{

    public JokeAdapter(AbsListView view, List<JokeBean> mDatas, int itemLayoutId) {
        super(view, mDatas, itemLayoutId);
    }

    @Override
    public void convert(AdapterHolder holder, final JokeBean item, boolean isScrolling, int position) {
        holder.setText(R.id.tv_content,item.getContent());
        holder.setText(R.id.tv_time, DateUtils.getStrToStr(item.getUpdatetime(), "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm"));
    }

}
